home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
QRZ! Ham Radio 8
/
QRZ Ham Radio Callsign Database - Volume 8.iso
/
mac
/
files
/
t_sys5
/
unixcpio.gz
/
unixnet.cpio
/
test_tick.c
< prev
next >
Wrap
C/C++ Source or Header
|
1994-07-11
|
402b
|
23 lines
#include <stdio.h>
#include <sys/types.h>
#include <sys/times.h>
/*
* Use this program to determine the proper value of MSPTICK for
* your system.
*/
main() {
long old, curr, times();
struct tms foo;
float f;
old = times(&foo);
for (;;) {
sleep(1);
curr = times(&foo);
f = 1000.0/(float)(curr - old);
printf("actual value = %f, MSPTICK = %d\n", f, (int)(f + 0.5));
old = curr;
}
}